from django.contrib import admin
from django.urls import path, include
from rest_framework_simplejwt.views import TokenObtainPairView, TokenRefreshView, TokenVerifyView

from .auth_views import GetTokenView, GetRefreshTokenView

urlpatterns = [
    path("admin/", admin.site.urls),
    path("home/", include("home.urls")),
    # 标准 JWT 路由（POST 请求）
    path('jwt/access/', TokenObtainPairView.as_view()),
    path('jwt/refresh/', TokenRefreshView.as_view()),
    path('jwt/verify/', TokenVerifyView.as_view()),
    # 自定义路由（GET 请求）
    path('api/access', GetTokenView.as_view()),
    path('api/refresh', GetRefreshTokenView.as_view()),
]
